-- GENERATED SPELL FOR [Tavarok] --


function spell0_18343(pUnit, Event) --@Arcing Smash,n/a--
pUnit:FullCastSpellOnTarget(8374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18343', 759, 1)
end

function spell1_18343(pUnit, Event) --@Arcing Smash,n/a--
pUnit:FullCastSpellOnTarget(38761,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18343', 752, 1)
end

function spell2_18343(pUnit, Event) --@Crystal Prison,n/a--
pUnit:FullCastSpellOnTarget(32361,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18343', 5000, 1)
end

function spell3_18343(pUnit, Event) --@Earthquake,Self--
pUnit:FullCastSpellOnTarget(33919,pUnit)
pUnit:RegisterEvent('Sorts_18343', 4000, 1)
end

function Sorts_18343(pUnit, Event)
local choix_sorts_18343 = math.random(0, 3)
if choix_sorts_18343 == 0 then
pUnit:RegisterEvent('spell0_18343', 1, 1)
end
if choix_sorts_18343 == 1 then
pUnit:RegisterEvent('spell1_18343', 1, 1)
end
if choix_sorts_18343 == 2 then
pUnit:RegisterEvent('spell2_18343', 1, 1)
end
if choix_sorts_18343 == 3 then
pUnit:RegisterEvent('spell3_18343', 1, 1)
end
end

function mob18343_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18343', math.random(1500, 3000), 1)
end

function mob18343_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18343_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18343_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18343, 1, 'mob18343_Action')
RegisterUnitEvent(18343, 2, 'mob18343_Leave')
RegisterUnitEvent(18343, 3, 'mob18343_Kill')
RegisterUnitEvent(18343, 4, 'mob18343_Die')
